package com.fisher.checker.db.entity;

import androidx.room.Entity;
import androidx.room.Index;
import androidx.room.PrimaryKey;

@Entity(tableName = "product_items", indices = {@Index(value = {"productBarcode"}, unique = true),
        @Index(value = {"electronPartBarcode"})})
public class ProductItemEntity {

    //主键ID
    @PrimaryKey(autoGenerate = true)
    private Long itemId;
    //产品编号
    private String productNo;

    //零件条码
    private String productBarcode;
    //电子件条码
    private String electronPartBarcode;

    //扫码日期字符串
    private String dateStr;

    public ProductItemEntity(){
    }
    public ProductItemEntity(String productNo, String productBarcode, String electronPartBarcode, String dateStr) {
        this.productNo = productNo;
        this.productBarcode = productBarcode;
        this.electronPartBarcode = electronPartBarcode;
        this.dateStr = dateStr;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getProductBarcode() {
        return productBarcode;
    }

    public void setProductBarcode(String productBarcode) {
        this.productBarcode = productBarcode;
    }

    public String getElectronPartBarcode() {
        return electronPartBarcode;
    }

    public void setElectronPartBarcode(String electronPartBarcode) {
        this.electronPartBarcode = electronPartBarcode;
    }

    public String getDateStr() {
        return dateStr;
    }

    public void setDateStr(String dateStr) {
        this.dateStr = dateStr;
    }
}
